<template>
  <div id="pay">
    <h1>暂时无法微信支付，请跳转浏览器支付宝支付</h1>
    
  </div>
</template>

<script>
export default {
  data() {
    return {
      alipayForm: null,
      test: "微信浏览器",
      aaa: "我日你妈",
    };
  },
  created() {
    let alipayForm = this.$route.query.alipayForm;
    this.alipayForm = alipayForm;
    setInterval(() => {
      console.log("ssssssssss");
      if (!this.isWeixinBrowser()) {
          console.log("111111111")

        this.test = "不是微信浏览器";
        document.write(this.alipayForm);
      } else {
        this.test = "微信浏览器aa";
      }
    }, 500);
  },
  methods: {
    // 判断是否为微信浏览器
    isWeixinBrowser() {
      let ua = navigator.userAgent.toLowerCase();
      this.aaa = ua;
      console.log(ua);
      console.log(this.test);
      console.log(this.aaa);
      return /micromessenger/.test(ua) ? true : false;
    },
  },
};
</script>

<style>
</style>